package com.expressage.service.impl;

import com.expressage.dao.StateDao;
import com.expressage.po.State;
import com.expressage.service.StateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 快递状态业务逻辑实现类
 */
@Service
public class StateServiceImpl implements StateService {

    @Autowired
    StateDao stateDao;

    @Override
    public List<State> findAll() {
        return stateDao.findAll();
    }

    @Override
    public State findByStateid(int stateid) {
        return stateDao.findByStateid(stateid);
    }

    @Override
    public boolean insert(State state) {
        return stateDao.insert(state)>0?true:false;
    }

    @Override
    public boolean delete(int[] stateid) {
        return stateDao.delete(stateid)>0?true:false;
    }

    @Override
    public boolean update(State state) {
        return stateDao.update(state)>0?true:false;
    }
}
